// Copyright (c) 2021 Presto Labs Pte. Ltd.
// Author: chensili

#include <string>

#include <pybind11/functional.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include "appcoin2/support/order/py_parser.h"

namespace py = pybind11;

namespace appcoin2::support::order {

void AddPyParser(py::module* m) {
  py::class_<PyOrderParser>(*m, "PyOrderParser")
      .def_static("from_mea_str", &PyOrderParser::from_mea_str)
      .def("add_product", &PyOrderParser::AddProduct)
      .def("set_user_cross_mode", &PyOrderParser::SetUseCrossMode)
      .def("parse_account_balance", &PyOrderParser::ParseBalance)
      .def("parse_account_position", &PyOrderParser::ParsePosition);
}

PYBIND11_MODULE(py_parser, m) {
  AddPyParser(&m);
};

}  // namespace appcoin2::support::order
